﻿using System.Collections.Generic;
using MiniWeb.Core.Dtos;
using MiniWeb.Core.Entities;
using MiniWeb.Dao;

using WFramework.MvcPager;

namespace MiniWeb.Task
{
	
	
	public  class NewsTypeTask
	{
	     private readonly NewsTypeDao _dao = new NewsTypeDao();
         public PagedList<NewsType> GetPagedList(int? rid, int pageIndex, int pageSize)
        {
            return _dao.GetPagedList(rid, pageIndex,pageSize);
        }
        
         public NewsType GetById(int id)
        {
            return _dao.GetById(id);
        }

         public List<NewsType> GetNewsList()
         {
             return _dao.GetNewsList();
         }

        
          public void Delete(int id)
        {
            
            _dao.Delete(id);
        }
        
   		     
		public bool Exists(int id)
		{
			
            return _dao.Exists(id);
		}
		
		public void Add(NewsType model)
		{
			
             _dao.Add(model);
		}
		
		public void Update(NewsType model)
		{
			
             _dao.Update(model);
		}
		
		 public List<NewsType> GetAll(int? top, string strwhere,string sort)
        {
            return _dao.GetAll(top, strwhere,sort);
        }
		
		
   
	}
}